function Tcp(id, ...args) {
  console.log(id,args);
  //const user_id1 = Process("session.Get", "user_id");
  //console.log("user_id1",user_id1);
  //onst res = Process("plugins.feishu.authurl", "zouwei","lulu");
  //console.log(res);
  let hosts = args[0];
  let host = hosts.split("，")[0]
  console.log("host",host);

  let res = Process("plugins.network.tcp",host,args[1]);
  let code = res.code
  console.log("code",code);
  let status = "running"
  if (code != 200) {
    let server = Process("models.cmdb.server.Find",id,{});
    if (server.status == "phase-out" || server.status == "pre-offline"){
      return  ["zou","wei"];
    }
    status = "pre-offline";
  }

  if (code == 200) {
    let server = Process("models.cmdb.server.Find",id,{});
    if (server.status == "running"){
      return  ["zou","wei"];
    }
    status = "running";
  }

  Process("models.cmdb.server.Update",id, {"status":status});
  // console.log(res);

  // todo 处理数据逻辑
  return ["zou","wei"];
}

function Test(...args) {
  console.log("-----------TEST------------")
  console.log(args);
}
